home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-21 | 661 b | 31 lines | [TEXT/ttxt] |
- --<<<
- -- Kaleida Labs, Inc.
- -- Field Guide to the ScriptX Language
- -- chapter 3, example 2
-
- -- create a module to avoid naming conflicts
- module Scratch11 uses ScriptX end
- in module Scratch11
-
- -- declare all globals used in these examples
- global myLine, myRectangularShape
-
- -- variable access
-
- myLine := new Line x1:10 y1:10 x2:65 y2:65
- myLine.x1
- myLine's y1
- myLine.y2 < myLine.y1
-
- object myRectangularShape (TwoDShape)
- stroke:blackBrush, boundary:(new Rect x2:100 y2:100)
- end
- myRectangularShape's boundary's x2
- myRectangularShape.boundary.x2
-
- myLine := new Line x1:10 y1:10 x2:65 y2:65
- myLine's x1 := 0
- myLine's y1 := 0
- myLine.x2 := 10
- myLine.y2 := 10
- -->>>